<?php
defined('BASEPATH') or die('forbidden');

class delplayerobject_controller extends Controller
{
	function _init()
	{
		check_level(50, segment(0), segment(1), segment(2, 'index'));
	}
	
	function index()
	{
		if(is_submit())
		{
			$rowdata = $_POST['row'];
			$str = array_to_stringparam($rowdata);
			$str = $rowdata['area_host'] . $str . "action=32";
			//print_r($str);
			//exit(0);
			$strResult = vpost($str);
			//echo $strResult;
			$result=0;
			//操作失败或者连接失败
			if($strResult!='0' || $strResult===FALSE)
			{
				$result = 1;
				unset($rowdata);
				echo "<script>alert('".translate('C_TIPS_ERROR_TEXT')."')</script>";
			}
			else
			{
				insert_log(translate('MENU_DEL_OBJECT'),translate('DEL'),NULL,$rowdata);
				echo "<script>alert('".translate('C_TIPS_SUCCESS_TEXT')."')</script>";
			}
		}
		$this->view->assign("arealist", $this->form->select("row[area_host]", get_area_list_host(), '', array('id' => 'area_host')));
		$this->view->display("seal/delplayerobject/index");
	}
}